package com.chiancloud.shield.common;

/**
 * Created by wanghui on 14-8-20.
 */
public interface ShieldKeys extends ShieldXmlConfKeys {


    String COMPONENT_AM = "shield-appmaster";
    int ROLE_AM_PRIORITY_INDEX = 0;

    String SHIELD_BASE_DIRECTORY = ".shield";
    String LOCAL_TARBALL_INSTALL_SUBDIR = "expandedarchive";
    String APP_TYPE = "com.chinacloud.shield";

    String JVM_ENABLE_ASSERTIONS = "-ea";
    String JVM_ENABLE_SYSTEM_ASSERTIONS = "-esa";
    String JVM_FORCE_IPV4 = "-Djava.net.preferIPv4Stack=true";
    String JVM_JAVA_HEADLESS = "-Djava.awt.headless=true";
    String PROPAGATED_CONF_DIR_NAME = "propagatedconf";
    String INFRA_DIR_NAME = "infra";
    String GENERATED_CONF_DIR_NAME = "generated";
    String SNAPSHOT_CONF_DIR_NAME = "snapshot";
    String DATA_DIR_NAME = "database";
    String HISTORY_DIR_NAME = "history";
    String HISTORY_FILENAME_SUFFIX = "json";
    String HISTORY_FILENAME_PREFIX = "rolehistory-";


    String HISTORY_FILENAME_CREATION_PATTERN = HISTORY_FILENAME_PREFIX +"%016x."+
            HISTORY_FILENAME_SUFFIX;
    String HISTORY_FILENAME_MATCH_PATTERN = HISTORY_FILENAME_PREFIX +"[0-9a-f]+\\."+
            HISTORY_FILENAME_SUFFIX;
    String HISTORY_FILENAME_GLOB_PATTERN = HISTORY_FILENAME_PREFIX +"*."+
            HISTORY_FILENAME_SUFFIX;
    String SHIELD_XML = "com/chinacloud/shield/shield.xml";

    String CLUSTER_DIRECTORY = "cluster";


    String PROPERTY_CONF_DIR = "shield.confdir";

    String SUBMITTED_CONF_DIR = "confdir";

    String CLIENT_RESOURCE = "shield-client.xml";

    String SERVER_RESOURCE = "shield-server.xml";

    String TMP_LOGDIR_PREFIX = "/tmp/shield-";
    String TMP_DIR_PREFIX = "tmp";
    String AM_DIR_PREFIX = "appmaster";

    String SHIELD_JAR = "shield.jar";
    String JCOMMANDER_JAR = "jcommander.jar";
    String GSON_JAR = "gson.jar";

    String DEFAULT_JVM_HEAP = "256M";
    int DEFAULT_YARN_MEMORY = 256;
    String STDOUT_AM = "shield-out.txt";
    String STDERR_AM = "shield-err.txt";
    String DEFAULT_GC_OPTS = "";

    String HADOOP_USER_NAME = "HADOOP_USER_NAME";
    String HADOOP_PROXY_USER = "HADOOP_PROXY_USER";
    String SHIELD_PASSPHRASE = "SHIELD_PASSPHRASE";

    boolean PROPAGATE_RESOURCE_OPTION = true;

    String SECURITY_DIR = "security";
    String CRT_FILE_NAME = "ca.crt";
    String CSR_FILE_NAME = "ca.csr";
    String KEY_FILE_NAME = "ca.key";
    String KEYSTORE_FILE_NAME = "keystore.p12";
    String CRT_PASS_FILE_NAME = "pass.txt";
    String PASSPHRASE = "DEV";
    String PASS_LEN = "50";
    String KEYSTORE_LOCATION = "ssl.server.keystore.location";
}
